<template>
	<view>
		<view class="d-flex j-start  flex-column  main-bg-color" style="height: 220rpx;">
			<view class="mt-3 d-flex a-center " style="padding: 0 0 0 30rpx;">
				<image src="../../static/image/sheshi3.png" mode="widthFix" style="width: 30rpx;height: 30rpx;"></image>
				<view class="font" style="color: #A9B4FF;padding: 0 0 0 20rpx;">
					{{build_list.buildingName}}
				</view>
			</view>
			<view class="mt-1 d-flex a-center " style="padding: 0 0 0 30rpx;">
				<image src="../../static/image/sheshi4.png" mode="widthFix" style="width: 30rpx;height: 30rpx;"></image>
				<view class="font" style="color: #A9B4FF;padding: 0 0 0 20rpx;">
					{{build_list.contactNumber}}
				</view>
			</view>
			<view class="mt-1 d-flex a-center " style="padding: 0 0 0 30rpx;">
				<image src="../../static/image/sheshi2.png" mode="widthFix" style="width: 30rpx;height: 30rpx;"></image>
				<view class="font" style="color: #A9B4FF;padding: 0 0 0 20rpx;">
					{{build_list.address}}
				</view>
			</view>
		</view>
		<view class="d-flex flex-column pb-4 pt-5 border-bottom" style="width: 90%;margin: 0 auto;" @tap="todevice(buildingId)">
			<view class="d-flex a-center ">
				<image src="../../static/image/sheshi.png" mode="widthFix"
					style="width: 44rpx;height: 44rpx;padding: 0 30rpx 0 0;"></image>
				<view class="font" style="color: #474747;">
					设备列表
				</view>
				<image src="../../static/image/right.png" mode="widthFix"
					style="width: 18rpx;height: 18rpx;position: relative;left:70%;"></image>
			</view>
		</view>
		<view class="d-flex flex-column pb-4 pt-5 border-bottom" style="width: 90%;margin: 0 auto;"
			@tap="tofacilities(buildingId)">
			<view class="d-flex a-center ">
				<image src="../../static/image/sheshi1.png" mode="widthFix"
					style="width: 44rpx;height: 44rpx;padding: 0 30rpx 0 0;"></image>
				<view class="font" style="color: #474747;">
					设施列表
				</view>
				<image src="../../static/image/right.png" mode="widthFix"
					style="width: 18rpx;height: 18rpx;position: relative;left:70%;"></image>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				// 建筑详情id
				buildingId: '',
				build_list:{}
			};
		},
		onLoad(e) {
			this.buildingId = e.buildingId
		},
		onShow() {
			this.getbuild_detail(this.buildingId)
		},
		methods: {
			//获取建筑列表详情内容
			getbuild_detail(e) {
				this.$https.get('system/building/xiaomaintainList', {
					buildingId: e,
				}).then(res => {
					this.build_list=res.rows[0]
					console.log(this.build_list, 'this.build_list');
				})
			},
			//设备列表
			todevice(e) {
				uni.navigateTo({
					url: "./device_list?buildingId=" + e
				})
			},
			//设施列表
			tofacilities(e) {
				uni.navigateTo({
					url: "./facilities_list?buildingId=" + e
				})
			}
		}
	}
</script>

<style lang="scss">

</style>
